-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HardwarePWM Esp32 - added assert for max pwm channels #2904
Conversation
PR Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition for PWM_CHANNEL_NUM_MAX
in Sming/Arch/Esp32/Components/driver/include/pwm.h
should always be obtained from the IDF. We cannot make assumptions, please amend to:
include <soc/soc_caps.h>
#define PWM_CHANNEL_NUM_MAX SOC_LEDC_CHANNEL_NUM
@pljakobs It would be nice to have the |
…M_MAX is set correctly
I have been using just that with minor changes. Will create a new PR |
…M_MAX is set correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken the liberty of fixing pwm.h. All good, thank you for the fix!
This PR updates the Sming coding style documentation as discussed in #2898 (comment) and #2904 (comment). Sming requires version 8 which is generally no longer available in the standard repositories for recent GNU/Linux distributions. Different versions of clang-format produce different output with the same configuration. This is such a common problem that a kind soul has provided standalone builds here https://github.com/muttleyxd/clang-tools-static-binaries/releases. The default name of the clang-format executable has been changed to `clang-format-8`. This is because `clang-format` is now very unlikely to be the default installed version, and so avoids the subtle issues with running the wrong version.
oh heck, was I still missing somehing? I thought I had it fixed. Thank you. |
if called with more than the supported channels (depending on the SoC), the constructor would silently fail, yielding a misleading error message.